<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();
    %>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>编辑书籍信息</title>
    <%--<link rel="stylesheet" href="<%=basePath%>/css/bootstrap.min.css" />--%>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">

</head>
<body>
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<%--	<script type="text/javascript" src="js/bootstrap.min.js"></script>--%>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
        integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd"
        crossorigin="anonymous"></script>

<div>
    <p style="font-size: 25px; margin-top: 20px; margin-left: 42px">编辑书籍信息</p>
</div>
<hr
        style="height: 10px; border: none; border-top: 10px groove skyblue;"/>

<div style="margin-top: 30px; margin-left: 430px">
    <form action="<%=basePath%>/admin/ManagerServlet?op=editBook"
          method="post">
        <div class="form-group">
            <input type="hidden" class="form-control" id="BookId" name="BookId"
                   value="${map.book.bookId}" style="width: 700px">
        </div>
        <div class="form-group">
            <label>书籍名称：</label> <input type="text" class="form-control"
                                        id="BookName" name="BookName" value="${map.book.bookName}"
                                        style="width: 700px">
        </div>
        <div class="form-group">
            <label>书籍作者：</label> <input type="text" class="form-control"
                                        id="BookAuthor" name="BookAuthor" value="${map.book.bookAuthor}"
                                        style="width: 700px">
        </div>
        <div class="form-group">
            <label>书籍出版社：</label> <input type="text" class="form-control"
                                         id="BookPress" name="BookPress" value="${map.book.bookPress}"
                                         style="width: 700px">
        </div>
        <div class="form-group">
            <label>书籍分类：</label> <select class="form-control" name="categoryid"
                                         title="书籍分类" style="width: 700px">
            <option selected="selected">${map.book.category.categoryName}</option>
            <c:forEach items="${map.category}" var="c">
                <option value="${c.categoryId}">${c.categoryName}</option>
            </c:forEach>
        </select>
        </div>
        <div class="form-group">
            <label for="file">图片上传：</label> <img
                style="width: 80px; height: 100px"
                src="${pageContext.request.contextPath}/img/${map.book.bookPrice}/${map.book.fileName}"/><input
                type="file" id="file" name="file">
        </div>
        <div class="form-group">
            <label>书籍简介：</label>
            <textarea class="form-control" rows="3" id="BookDesc"
                      name="BookDesc" style="width: 700px">${map.book.bookDesc}</textarea>
        </div>
        <div class="form-group">
            <label>书籍单价：</label> <input type="text" class="form-control"
                                        id="BookPrice" name="BookPrice" value="${map.book.bookPrice}"
                                        style="width: 700px">
        </div>
        <div class="form-group">
            <label>书籍库存：</label> <input type="text" class="form-control"
                                        id="BookKunumber" name="BookKunumber"
                                        value="${map.book.bookKunumber}" style="width: 700px">
        </div>
        <br>
        <button type="submit" class="btn btn-default"
                onclick="window.location='manager/ManagerServlet?op=editBook'">提交
        </button>
        <button type="button" class="btn btn-default" data-dismiss="modal"
                style="margin-left: 100px" onclick="javascript :history.go(-1);">关闭
        </button>
    </form>
</div>
</body>
</html>